package com.terrace.db.system.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.terrace.db.system.mapper.entity.DataSource;

/**
 * 数据源Dao
 * @author jiangyg
 *
 */
public interface DataSourceDao {
	
	/**
	 * 新增数据源
	 * @param dataSource
	 * @return
	 */
	public int insertDataSourceSelective(DataSource dataSource);
	
	/**
	 * 删除数据源
	 * @param dbName
	 * @return
	 */
	public int deleteDataSourceByName(@Param("dbName") String dbName);
	
	/**
	 * 修改数据源
	 * @param dataSource
	 * @return
	 */
	public int updateDataSourceByNameSelective(DataSource dataSource);
    
	/**
	 * 查询数据源
	 * @param dbName
	 * @return
	 */
	public DataSource selectDataSourceByName(@Param("dbName") String dbName);
	
	/**
	 * 分页查询
	 * @param dataSource
	 * @return
	 */
	public List<DataSource> selectDataSourceForPagination(DataSource dataSource);
	
}